﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using YArchitech.Controls;
using YArchitech.LIB;
using YArchitech.LIB.YJKControls;

namespace YArchitech.Plumbing
{
	public partial class FormHideOrShowSet : System.Windows.Forms.Form
	{
		public FormHideOrShowSet()
		{
			this.InitializeComponent();
			new YJKProcessTools().ShowInTaskbarChange(this);
			base.Icon = Resource.YArchitechIcon;
		}

		private void btnHide_Click(object sender, EventArgs e)
		{
			if (this.selectObjs.Count == 0)
			{
				YJKMessageBox.Show("您未选择对象");
				return;
			}
			this.hideOrShow = HideOrShow.Hide;
			base.DialogResult = DialogResult.OK;
		}

		private void btnShow_Click(object sender, EventArgs e)
		{
			if (this.selectObjs.Count == 0)
			{
				YJKMessageBox.Show("您未选择对象");
				return;
			}
			this.hideOrShow = HideOrShow.Show;
			base.DialogResult = DialogResult.OK;
		}

		private void chkSpinkLer_CheckedChanged(object sender, EventArgs e)
		{
			if (this.chkSpinkLer.Checked)
			{
				this.selectObjs.Add(this.spinkLer);
				return;
			}
			this.selectObjs.Remove(this.spinkLer);
		}

		private void chkStanPipe_CheckedChanged(object sender, EventArgs e)
		{
			if (this.chkAuxiliaryFrame.Checked)
			{
				this.selectObjs.Add(this.stanPipe);
				return;
			}
			this.selectObjs.Remove(this.stanPipe);
		}

		private void chkSprayRadius_CheckedChanged(object sender, EventArgs e)
		{
			if (this.chkSprayRadius.Checked)
			{
				this.selectObjs.Add(this.sprayRadius);
				return;
			}
			this.selectObjs.Remove(this.sprayRadius);
		}

		private void chkFireHydrantRadius_CheckedChanged(object sender, EventArgs e)
		{
			if (this.chkFireHydrantRadius.Checked)
			{
				this.selectObjs.Add(this.fireHydrantRadius);
				return;
			}
			this.selectObjs.Remove(this.fireHydrantRadius);
		}

		public List<SelectElems> selectObjs = new List<SelectElems>();

		public HideOrShow hideOrShow;

		private SelectElems spinkLer;

		private SelectElems stanPipe = SelectElems.AuxiliaryFrame;

		private SelectElems sprayRadius = SelectElems.SprayRadius;

		private SelectElems fireHydrantRadius = SelectElems.FireHydrantRadius;
	}
}
